//获取背景图
let ba = [
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/bg1.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/bg2.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/bg3.png'
]
function getba() {
  for (let i = 0; i < ba.length; i++) {
    wx.cloud.downloadFile({
      fileID: ba[i],
      success: res => {
        // console.log(res)
        wx.setStorageSync('bg' + i, res.tempFilePath)
      },
      fail: console.error
    })
  }
}
//福利里面的图片
let fulis = [
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/fuli/big.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/fuli/huodong1.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/fuli/huodong2.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/fuli/huodong3.png',
]
function getfuli() {
  for (let i = 0; i < fulis.length; i++) {
    wx.cloud.downloadFile({
      fileID: fulis[i],
      success: res => {
        // console.log(res)
        wx.setStorageSync('fuli' + i, res.tempFilePath)
      },
      fail: console.error
    })
  }
}
//获取我的图片信息
let mys = [
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/my/dingdan.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/my/expleft.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/my/expright.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/my/hunjing.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/my/kuang.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/my/level.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/my/touxiang.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/my/youhuiquan.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/my/yue.png'
]
function getmy() {
  for (let i = 0; i < mys.length; i++) {
    wx.cloud.downloadFile({
      fileID: mys[i],
      success: res => {
        // console.log(res)
        wx.setStorageSync('my' + i, res.tempFilePath)
      },
      fail: console.error
    })
  }
}
//明细图片资源
function mingxi() {
  wx.cloud.downloadFile({
    fileID: 'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/mingxi/mingxi.png',
    success: res => {
      // console.log(res)
      wx.setStorageSync('mingxi', res.tempFilePath)
    },
    fail: console.error
  })

}
//余额图片资源
let yues = [
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/yue/bag.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/yue/butbag.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/yue/paybut.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/yue/xuanze.png'
]
function getyue() {
  for (let i = 0; i < yues.length; i++) {
    wx.cloud.downloadFile({
      fileID: yues[i],
      success: res => {
        // console.log(res)
        wx.setStorageSync('yue' + i, res.tempFilePath)
      },
      fail: console.error
    })
  }
}
//获取首页图片资源
let homes = [
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/1.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/10.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/2.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/3.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/4.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/5.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/6.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/7.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/all.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/card.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/quan.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/quanjushang.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/tabbg.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/wu.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/wuxianchi.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/yi.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/yifanshang.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/yuan1.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/home/yuan2.png'
]
function gethome() {
  for (let i = 0; i < homes.length; i++) {
    wx.cloud.downloadFile({
      fileID: homes[i],
      success: res => {
        // console.log(res)
        wx.setStorageSync('home' + i, res.tempFilePath)
      },
      fail: console.error
    })
  }
}
//抽赏图片资源获取
let choushangs = [
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/choushang/1.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/choushang/2.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/choushang/3.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/choushang/chuanshuo.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/choushang/guanbi.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/choushang/zuanshi.png'
]
function getchoushang() {
  for (let i = 0; i < choushangs.length; i++) {
    wx.cloud.downloadFile({
      fileID: choushangs[i],
      success: res => {
        // console.log(res)
        wx.setStorageSync('choushang' + i, res.tempFilePath)
      },
      fail: console.error
    })
  }
}
//玩法图片获取
let wanfa = [
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/yifanshang/1.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/yifanshang/10.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/yifanshang/2.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/yifanshang/3.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/yifanshang/4.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/yifanshang/5.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/yifanshang/6.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/yifanshang/7.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/yifanshang/8.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/yifanshang/9.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/yifanshang/a.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/yifanshang/b.png',
  'cloud://prod-9gbx4romf8b968e1.7072-prod-9gbx4romf8b968e1-1316521626/images/yifanshang/chou.png'
]
function getwanfa() {
  for (let i = 0; i < wanfa.length; i++) {
    wx.cloud.downloadFile({
      fileID: wanfa[i],
      success: res => {
        // console.log(res)
        wx.setStorageSync('wanfa' + i, res.tempFilePath)
      },
      fail: console.error
    })
  }
}
function imgs() {
  gethome()
  getyue()
  getba()
  getfuli()
  getmy()
  mingxi()
  getchoushang()
  getwanfa()
}
module.exports = {
  gethome,
  getyue,
  getba,
  getfuli,
  getmy,
  mingxi,
  getchoushang,
  getwanfa,
  imgs
}